#include <Wire.h>
#include <Rainbowduino_NooTe.h>

#define LED_MATRIX_I2C 0x06

#define LED_ANIM_BLANK 0
#define LED_ANIM_ERROR 1
#define LED_ANIM_WARNING 2
#define LED_ANIM_CYLON 3
#define LED_ANIM_GREENWHEEL 4
#define LED_ANIM_ECHO 5

void setup()
{
  Serial.begin(9600);
  
  Wire.begin(LED_MATRIX_I2C); // join i2c bus
  Wire.onReceive(receiveEvent); // define the receive function for receiving data from master
  
  Rb.init();
  delay(250);

  setMatrixAnimation(LED_ANIM_ECHO);
}

void receiveEvent(int nReceived){
  check_commands();
}

void loop()
{
  drawMatrix8x8();
}

